﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
</head>
<body style="background-color: white;">
    <section class="container-fluid" style="background-color: white;">
        <form class="form-horizontal m15_t" id="form">
            <div class="tab-content">
                <input type="hidden" name="orderNo">
                <div class="tab-pane fade in active" id="home">
                    <div class="form-group">
                        <label class="wd100 control-label">付款公司：</label>
                        <div class="wd250 m15_l">
                            <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="companyName">immi</label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">收款姓名：</label>
                        <div class="wd250 m15_l">
                            <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="clientAccountName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">付款金额：</label>
                        <div class="wd250 m15_l">
                            <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="amount"></label>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </section>
</body>
</html>
<script type="text/javascript">

    var orderNo = "";

    function init() {

        var cover = FlashPay.UI.Mask({
            obj: $("body"),
            opacity: 0.5
        });

        FlashPay.Util.Ajax({
            type: "POST",
            url: "/Payment/GetPaymentConfirmRecord/" + orderNo,
            data: null,
            success: function (response) {

                if (response.success) {
                    FlashPay.Util.SetLabelHtml("companyName", response.data.companyName);
                    FlashPay.Util.SetLabelHtml("clientAccountName", response.data.clientAccountName)
                    FlashPay.Util.SetLabelHtml("amount", response.data.amount)
                    FlashPay.Util.SetLabelHtml("orderNo", response.data.orderNo)
                    cover.Remove();
                } else {
                    FlashPay.UI.Tip_short_warning(response.errorMessage);
                }
            },
            error: function (e) {

                cover.Remove();
                FlashPay.UI.Tip_short_warning("操作失败！请查看网络，请重试");
            }
        });
    }

    $(function () {

        orderNo = FlashPay.Util.GetQueryString("orderNo");
        init();

    })

    function save() {

        FlashPay.Util.Ajax({
            url: '/Payment/PaymentConfirm',
            type: 'POST',
            data: { orderNo: orderNo },
            success: function (response) {
                if (response.success) {
                    FlashPay.UI.DialogOpener().Tip_success("操作成功！");
                    FlashPay.UI.DialogOpener().doSearch();
                    FlashPay.UI.CloseDialog();
                } else {
                    FlashPay.UI.Tip_short_warning("操作失败！" + response.errorMessage);
                }
            },
            error: function (json) {
                FlashPay.UI.Tip_short_warning("操作失败！请查看网络，请重试!");
            }
        });
    }
</script>